package cn.laixueit;

import java.util.Scanner;

public class Demo2 {
    public static void main(String[] args) {
        String[] names  = new String[5];
        Scanner input = new Scanner(System.in);
        for (int i = 0; i < names.length; i++) {
            System.out.println("请输入第"+(i+1)+"个学生姓名:");
            names[i] = input.next();
        }

        System.out.println("下面是您录入的学生姓名:");
        for (int i = 0; i < names.length; i++) {
            System.out.println(names[i]);
        }
    }
}
